/****************************************************
	文件：TimeTask.cs
	作者：HuskyT
	邮箱：1005240602@qq.com
	日期：2021/1/10 12:48:13
	功能：计时任务
*****************************************************/

using System;

namespace HTFW.Core
{
    public class TimeTask
    {
        #region 字段

        /// <summary>
        /// 全局ID
        /// </summary>
        public int TID;

        /// <summary>
        /// 目标任务
        /// </summary>
        public Action<int> CallBack;

        /// <summary>
        /// 延迟时间
        /// </summary>
        public double DelayTime;

        /// <summary>
        /// 目标任务执行时间
        /// </summary>
        public double ActTime;

        /// <summary>
        /// 循环执行次数（0为无限循环）
        /// </summary>
        public int LoopCount;

        #endregion

        public TimeTask(int tID, Action<int> callBack, double delayTime, double actTime, int loopCount)
        {
            TID = tID;
            CallBack = callBack;
            DelayTime = delayTime;
            ActTime = actTime;
            LoopCount = loopCount;
        }
    }
}